package springboot.demo.test;

import java.io.UnsupportedEncodingException;
import java.security.SecureRandom;
import java.util.Base64;

/**
 * <p>Project: springboot-demo </p>
 * 
 * <p>Function:  </p>
 * 
 * <p>Description:  </p>
 * 
 * @author weiqiang.li
 * 
 * @date 2018/11/27
 * 
 * @version 1.0
 */
public class Maintest {
    public static void main(String[] args) throws UnsupportedEncodingException {
        SecureRandom secureRandom = new SecureRandom();
        for (int i = 0; i < 100; i++) {
            String s = "";
            for (int j = 0; j < 6; j++) {
                s += secureRandom.nextInt(10);
            }
//            System.out.println(s);
            System.out.println(Base64.getEncoder().encodeToString(s.toString().getBytes("UTF-8")));
        }
    }
}
